import java.util.Arrays;

import static java.lang.System.*;

class Solution {
    public void merge(int[] nums1, int m, int[] nums2, int n) {
        int[] nums= new int[m+n];
       System.arraycopy(nums2,0,nums,m,n);
        System.arraycopy(nums1,0,nums,0,m);
        Arrays.sort(nums);
        out.println(Arrays.toString(nums));

    }
}
public class Test {
    public static void main(String[] args) {
int[] nums1 = {1,2};
int[] nums2 = {1,2};
int m =nums1.length;
int n =nums2.length;
Solution solution = new Solution();
solution.merge(nums1,m,nums2,n);
    }
}
